package com.customer.service.impl;

import com.customer.dao.UserDao;
import com.customer.pojo.User;
import com.customer.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author kxk
 * @version 1.0
 * @ClassName: CourierServiceImpl
 * @Description: TODO   用户业务逻辑实现
 * @Date: 2021-05-10 14:10
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;

    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }

    @Override
    public User findByuid(int uid) {
        return userDao.findByuid(uid);
    }

    @Override
    public boolean addUser(User user) {
        return userDao.addUser(user)>0?true:false;
    }

    @Override
    public boolean updateUser(User user) {
        return userDao.updateUser(user)>0?true:false;
    }

    @Override
    public boolean deleteUserByuids(int[] ids) {
        return userDao.deleteUserByuids(ids)>0?true:false;
    }

    @Override
    public User findByPassAndTel(String uTel, String uPass) {
        return userDao.findByPassAndTel(uTel, uPass);
    }

    @Override
    public User findByTel(String uTel) {
        return userDao.findByTel(uTel);
    }
}
